package towers;

import java.awt.Dimension;
import java.awt.geom.Point2D;

import javax.swing.ImageIcon;

import projectiles.Bullet;
import projectiles.Projectile;

/**
 * @author Roland Kamphuis
 *
 */
public class Bunker extends Tower {

	//Het lijstje gegevens
	private static final int maxHealth = 150;
	private static int health = maxHealth;
	private static final int range = 300;
	private static final int firerate = 100;
	public static final int cost = 50;
	private static final ImageIcon image = new ImageIcon("images/bunker.gif");
	private static final Dimension size = new Dimension( Bunker.image.getIconWidth(), Bunker.image.getIconHeight() );

	
	/**
	 *  Constructor
	 * @param position De positie van de cannon meegeven
	 */
	public Bunker( Point2D.Double position ) {
		super(position, health, Bunker.image, size, 0, range, firerate, cost);
	}

	
	/**
	 *  Zorgt ervoor dat een projectiel afgeschoten word op de vijand waar op het moment
	 *  op gericht word
	 */
	public Projectile shoot(){
		updateFirerate();
		
		return new Bullet( this, this.getMiddle(), viewAngle, this.getForesideEnemy()  );
	}

}